package com.own.business.sync.trigger.base.property;

import com.own.constant.ConstantValue;
import lombok.Data;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * SyncTriggerProperty
 *
 * @author chenxueli
 * @date 2024-01-08 15:52:04
 */
@Data
@SpringBootConfiguration
@ConfigurationProperties(prefix = SyncTriggerProperty.PREFIX)
public class SyncTriggerProperty {

    public static final String PREFIX = ConstantValue.CONFIG_VALUE_CONTENT + "sync.trigger";

    /**
     * 应用key
     */
    private String appKey;

    /**
     * 轮询间隔时间（毫秒）
     */
    private Long[] pollingTimeList = new Long[]{10000L};

    /**
     * 是否开启
     */
    private Boolean enablePolling = false;

    /**
     * 是否开启
     */
    private Boolean enableSave = true;

    /**
     * 查询的条数（在使用store的时候会用到）
     */
    private Integer storeLimit = 100;

    /**
     * 缓存的key
     */
    private String storeKey = "stc";

}
